package a.f.a;

import a.d.t;

class h
{
  static t a(t paramt1, t paramt2)
  {
    int i = e.M;
    if (i == 0) {
      if (paramt1 != null)
      {
        if (i != 0) {
          break label39;
        }
        if (paramt2 != null) {
          break label38;
        }
      }
    }
    if (i == 0) {}
    return paramt1 == null ? paramt2 : paramt1;
    label38:
    label39:
    double d1 = Math.min(paramt1.d(), paramt2.d());
    double d2 = Math.max(paramt1.d() + paramt1.b(), paramt2.d() + paramt2.b());
    double d3 = Math.min(paramt1.e(), paramt2.e());
    double d4 = Math.max(paramt1.e() + paramt1.c(), paramt2.e() + paramt2.c());
    return new t(d1, d3, d2 - d1, d4 - d3);
  }
  
  static double b(t paramt1, t paramt2)
  {
    if (e.M == 0) {
      if (t.a(paramt1, paramt2)) {
        return 0.0D;
      }
    }
    double d1 = a(paramt1, paramt2, false);
    double d2 = a(paramt1, paramt2, true);
    return Math.sqrt(d1 * d1 + d2 * d2);
  }
  
  private static double a(t paramt1, t paramt2, boolean paramBoolean)
  {
    double d1 = paramBoolean ? paramt1.d() : paramt1.e();
    double d2 = paramBoolean ? paramt1.d() + paramt1.b() : paramt1.e() + paramt1.c();
    double d3 = paramBoolean ? paramt2.d() : paramt2.e();
    double d4 = paramBoolean ? paramt2.d() + paramt2.b() : paramt2.e() + paramt2.c();
    return a(d1, d2, d3, d4);
  }
  
  private static double a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    int i = e.M;
    if (i == 0)
    {
      if (paramDouble4 < paramDouble1) {
        return paramDouble4 - paramDouble1;
      }
      if (i != 0) {}
    }
    else if (paramDouble2 < paramDouble3)
    {
      return paramDouble3 - paramDouble2;
    }
    return 0.0D;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.a.h
 * JD-Core Version:    0.7.0.1
 */